<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class TheClass extends Model
{
    protected $table = 'class';

    protected $fillable = ['id', 'teacher_id', 'name', 'invitation_code', 'student_code', 'created_at', 'updated_at'];


    /**
     * 获取教师
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     * @author skyjerry ldwangzhen@gmail.com
     */
    public function teacher() {
        return $this->belongsTo('App\Model\Teacher');
    }
}
